import request from "@/utils/request";

export const get = function (uri, data, config) {
  return request({
    method: "get",
    url: "/device/" + uri,
    params: data,
    ...config,
  });
};

export const post = function (uri, data, config) {
  return request({
    method: "post",
    url: "/device/" + uri,
    data,
    ...config,
  });
};

export const put = function (uri, data, config) {
  return request({
    method: "put",
    url: "/device/" + uri,
    data,
    ...config,
  });
};

export const remove = function (uri, data, config) {
  return request({
    method: "delete",
    url: "/device/" + uri,
    params: data,
    ...config,
  });
};

export default {
  get,
  post,
  put,
  remove,
};
